From bf8fc36917df0c5190548350a06bd6ff1f4a6ace Mon Sep 17 00:00:00 2001 From: Tim Deegan Date: Tue, 13 Mar 2007 15:55:37 +0000 Subject: [PATCH] [HVM] Save/restore: more state propagation in xend Signed-off-by: Tim Deegan --- tools/python/xen/xend/XendCheckpoint.py | 4 ++-- tools/python/xen/xend/XendConfig.py | 11 ++++++----- tools/python/xen/xend/image.py | 2 +- tools/python/xen/xend/server/vfbif.py | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tools/python/xen/xend/XendCheckpoint.py b/tools/python/xen/xend/XendCheckpoint.py index ba9ee645c7..7881130092 100644 --- a/tools/python/xen/xend/XendCheckpoint.py +++ b/tools/python/xen/xend/XendCheckpoint.py @@ -192,8 +192,8 @@ def restore(xd, fd, dominfo = None, paused = False): is_hvm = dominfo.info.is_hvm() if is_hvm: hvm = dominfo.info['memory_static_min'] - apic = dominfo.info['image']['hvm'].get('apic', 0) - pae = dominfo.info['image']['hvm'].get('pae', 0) + apic = dominfo.info['platform'].get('apic', 0) + pae = dominfo.info['platform'].get('pae', 0) log.info("restore hvm domain %d, mem=%d, apic=%d, pae=%d", dominfo.domid, hvm, apic, pae) else: diff --git a/tools/python/xen/xend/XendConfig.py b/tools/python/xen/xend/XendConfig.py index 4dd1367c2d..bdf9370380 100644 --- a/tools/python/xen/xend/XendConfig.py +++ b/tools/python/xen/xend/XendConfig.py @@ -118,11 +118,12 @@ XENAPI_CFG_TO_LEGACY_CFG = { LEGACY_CFG_TO_XENAPI_CFG = reverse_dict(XENAPI_CFG_TO_LEGACY_CFG) # Platform configuration keys. -XENAPI_PLATFORM_CFG = [ 'acpi', 'apic', 'device_model', 'display', 'fda', - 'fdb', 'keymap', 'isa', 'localtime', 'nographic', - 'pae', 'serial', 'sdl', 'soundhw','stdvga', 'usb', - 'usbdevice', 'vnc', 'vncconsole', 'vncdisplay', - 'vnclisten', 'vncpasswd', 'vncunused', 'xauthority'] +XENAPI_PLATFORM_CFG = [ 'acpi', 'apic', 'boot', 'device_model', 'display', + 'fda', 'fdb', 'keymap', 'isa', 'localtime', + 'nographic', 'pae', 'serial', 'sdl', + 'soundhw','stdvga', 'usb', 'usbdevice', 'vnc', + 'vncconsole', 'vncdisplay', 'vnclisten', + 'vncpasswd', 'vncunused', 'xauthority'] # List of XendConfig configuration keys that have no direct equivalent # in the old world. diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index 33e1b1100b..7b6102b557 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -392,7 +392,7 @@ class HVMImageHandler(ImageHandler): # Find RFB console device, and if it exists, make QEMU enable # the VNC console. # - if vmConfig['platform'].get('nographic'): + if int(vmConfig['platform'].get('nographic', 0)) != 0: # skip vnc init if nographic is set ret.append('-nographic') return ret diff --git a/tools/python/xen/xend/server/vfbif.py b/tools/python/xen/xend/server/vfbif.py index fb510de25f..cbef190248 100644 --- a/tools/python/xen/xend/server/vfbif.py +++ b/tools/python/xen/xend/server/vfbif.py @@ -46,7 +46,7 @@ class VfbifController(DevController): def createDevice(self, config): DevController.createDevice(self, config) - if self.vm.info.get('HVM_boot_policy'): + if self.vm.info.is_hvm(): # is HVM, so qemu-dm will handle the vfb. return -- 2.30.2